//
//  KLBookEntityDAO.h
//  KLBookStore
//
//  Created by apple on 2017/10/15.
//  Copyright © 2017年 NetEaseExam. All rights reserved.
//

#import "KLBookBaseDAO.h"
#import "KLBookEntity.h"

@interface KLBookEntityDAO : KLBookBaseDAO

+ (long long)insertModel:(KLBookEntity *)bookEntity withDataBase:(FMDatabase *)db;

+ (KLBookEntity *)queryModelById:(long long)localId withDataBase:(FMDatabase *)db;

+ (KLBookEntity *)queryModelByDoubanId:(long long)doubanId withDataBase:(FMDatabase *)db;

+ (BOOL)deleteModelWithId:(long long)localId withDataBase: (FMDatabase *)db;

+ (BOOL)deleteModelWithDoubanId:(long long)doubanId withDataBase: (FMDatabase *)db;

+ (NSArray<KLBookEntity *> *)queryAllModelsWithDataBase: (FMDatabase *)db;

+ (NSArray<KLBookEntity *> *)queryModelsWithDataBase: (FMDatabase *)db offset:(long long)offset pageSize:(NSUInteger)size ;

@end
